home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 456 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.5 KB  |  52 lines

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: David Byrden <100101.2547@compuserve.com>
  3. Newsgroups: comp.std.c++
  4. Subject: Tiny but embarassing typo in standard
  5. Date: 23 Feb 1996 03:39:36 GMT
  6. Organization: self-employed
  7. Approved: clamage@eng.sun.com (comp.std.c++)
  8. Message-ID: <4girfp$soo@news.bridge.net>
  9. NNTP-Posting-Host: taumet.eng.sun.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset="us-ascii"
  12. Content-Transfer-Encoding: 7bit
  13. X-Nntp-Posting-Host: ppp-mia2-81.bridge.net
  14. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  15. X-Lines: 26
  16. Content-Length: 592
  17. Originator: clamage@taumet
  18.  
  19.  
  20.  
  21. 14.3.2.1
  22.  
  23.     template<class T> class Y {
  24.           public:
  25.                   void f1() { g1(1); }
  26.                   void f2() { g2(2); }
  27.                   void f3() { g3(3); }
  28.                   void f4() { g4(4); }
  29.           };
  30.  
  31.           void k(const Y<int>& h)
  32.           {
  33.                   void g1(int);
  34.                   h.f1(); // error: g1(int) called by g1(1) not found
  35.                           //        local g1() not considered
  36.           }
  37.  
  38.  
  39.   Of course, f1() cannot be called in any case because someone forgot to 
  40. declare it const. 
  41.  
  42.                                   David
  43.  
  44.  
  45.  
  46. [ To submit articles: Try just posting with your newsreader.
  47.               If that fails, use mailto:std-c++@ncar.ucar.edu
  48.   FAQ:    http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  49.   Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  50.   Comments? mailto:std-c++-request@ncar.ucar.edu
  51. ]
  52.